package cn.sdormitory.knowledgebase.pojo;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * @author yy
 */

@Data
@TableName(value ="study_skills_batch")
public class StudySkillsBatch {

    @TableId(value="id")
    @ApiModelProperty(value="主键")
    private Integer id;

    @TableField(value="study_skills_id")
    @ApiModelProperty(value="学习技能id")
    private Integer studySkillsId;

    @TableField(value="study_batch")
    @ApiModelProperty(value="学习批次(0:永久)")
    private Integer studyBatch;

    @TableField(value="start_date")
    @ApiModelProperty(value="开始日期")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date startDate;

    @TableField(value="end_date")
    @ApiModelProperty(value="结束日期")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date endDate;

    @TableField(value="status")
    @ApiModelProperty(value="状态(0:未启用 1:启用)")
    private Boolean status;

    @TableField(value="create_time")
    @ApiModelProperty(value="创建时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(value="modify_time")
    @ApiModelProperty(value="修改时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifyTime;

}
